home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 19.zip / BS1 part 19 / Lattice C disk 4.adf / Compiler_Headers / graphics / rastport.h < prev    next >
C/C++ Source or Header  |  1988-10-25  |  4KB  |  110 lines

  1. #ifndef GRAPHICS_RASTPORT_H
  2. #define GRAPHICS_RASTPORT_H
  3. /*
  4. **    $Filename: graphics/rastport.h $
  5. **    $Release: 1.3 $
  6. **
  7. **    
  8. **
  9. **    (C) Copyright 1985,1986,1987,1988 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13. #ifndef GRAPHICS_GFX_H
  14. #include <graphics/gfx.h>
  15. #endif
  16.  
  17. struct AreaInfo
  18. {
  19.     SHORT   *VctrTbl;          /* ptr to start of vector table */
  20.     SHORT   *VctrPtr;          /* ptr to current vertex */
  21.     BYTE    *FlagTbl;          /* ptr to start of vector flag table */
  22.     BYTE    *FlagPtr;          /* ptrs to areafill flags */
  23.     SHORT   Count;          /* number of vertices in list */
  24.     SHORT   MaxCount;          /* AreaMove/Draw will not allow Count>MaxCount*/
  25.     SHORT   FirstX,FirstY;    /* first point for this polygon */
  26. };
  27.  
  28. struct TmpRas
  29. {
  30.     BYTE *RasPtr;
  31.     LONG Size;
  32. };
  33.  
  34. /* unoptimized for 32bit alignment of pointers */
  35. struct GelsInfo
  36. {
  37.     BYTE sprRsrvd;          /* flag of which sprites to reserve from
  38.                  vsprite system */
  39.     UBYTE Flags;          /* system use */
  40.     struct VSprite *gelHead, *gelTail; /* dummy vSprites for list management*/
  41.     /* pointer to array of 8 WORDS for sprite available lines */
  42.     WORD *nextLine;
  43.     /* pointer to array of 8 pointers for color-last-assigned to vSprites */
  44.     WORD **lastColor;
  45.     struct collTable *collHandler;     /* addresses of collision routines */
  46.     short leftmost, rightmost, topmost, bottommost;
  47.    APTR firstBlissObj,lastBlissObj;    /* system use only */
  48. };
  49.  
  50. struct RastPort
  51. {
  52.     struct  Layer *Layer;
  53.     struct  BitMap   *BitMap;
  54.     USHORT  *AreaPtrn;          /* ptr to areafill pattern */
  55.     struct  TmpRas *TmpRas;
  56.     struct  AreaInfo *AreaInfo;
  57.     struct  GelsInfo *GelsInfo;
  58.     UBYTE   Mask;          /* write mask for this raster */
  59.     BYTE    FgPen;          /* foreground pen for this raster */
  60.     BYTE    BgPen;          /* background pen     */
  61.     BYTE    AOlPen;          /* areafill outline pen */
  62.     BYTE    DrawMode;          /* drawing mode for fill, lines, and text */
  63.     BYTE    AreaPtSz;          /* 2^n words for areafill pattern */
  64.     BYTE    linpatcnt;          /* current line drawing pattern preshift */
  65.     BYTE    dummy;
  66.     USHORT  Flags;          /* miscellaneous control bits */
  67.     USHORT  LinePtrn;          /* 16 bits for textured lines */
  68.     SHORT   cp_x, cp_y;          /* current pen position */
  69.     UBYTE   minterms[8];
  70.     SHORT   PenWidth;
  71.     SHORT   PenHeight;
  72.     struct  TextFont *Font;   /* current font address */
  73.     UBYTE   AlgoStyle;          /* the algorithmically generated style */
  74.     UBYTE   TxFlags;          /* text specific flags */
  75.     UWORD   TxHeight;          /* text height */
  76.     UWORD   TxWidth;          /* text nominal width */
  77.     UWORD   TxBaseline;          /* text baseline */
  78.     WORD    TxSpacing;          /* text spacing (per character) */
  79.     APTR    *RP_User;
  80.     ULONG   longreserved[2];
  81. #ifndef GFX_RASTPORT_1_2
  82.     UWORD   wordreserved[7];  /* used to be a node */
  83.     UBYTE   reserved[8];      /* for future use */
  84. #endif
  85. };
  86.  
  87. /* drawing modes */
  88. #define JAM1        0          /* jam 1 color into raster */
  89. #define JAM2        1          /* jam 2 colors into raster */
  90. #define COMPLEMENT  2          /* XOR bits into raster */
  91. #define INVERSVID   4          /* inverse video for drawing modes */
  92.  
  93. /* these are the flag bits for RastPort flags */
  94. #define FRST_DOT    0x01      /* draw the first dot of this line ? */
  95. #define ONE_DOT        0x02      /* use one dot mode for drawing lines */
  96. #define DBUFFER        0x04      /* flag set when RastPorts
  97.                  are double-buffered */
  98.  
  99.          /* only used for bobs */
  100.  
  101. #define AREAOUTLINE 0x08      /* used by areafiller */
  102. #define NOCROSSFILL 0x20      /* areafills have no crossovers */
  103.  
  104. /* there is only one style of clipping: raster clipping */
  105. /* this preserves the continuity of jaggies regardless of clip window */
  106. /* When drawing into a RastPort, if the ptr to ClipRect is nil then there */
  107. /* is no clipping done, this is dangerous but useful for speed */
  108.  
  109. #endif    /* GRAPHICS_RASTPORT_H */
  110.